{template '_header'}

<div class="page-header">
    当前位置：<span class="text-primary">{if !empty($item['id'])}编辑{else}添加{/if}幻灯片 <small>{if !empty($item['id'])}修改【{$item['title']}】{/if}</small></span>

</div>
 
 
    <div class="page-content">
        <div class="page-sub-toolbar">
            <span class=''>
                    {ifp 'system.copyright.notice.add'}
                            <a class="btn btn-primary btn-sm" href="{php echo webUrl('system/copyright/notice/add')}">添加新公告</a>
                    {/if}
            </span>
        </div>
        <form {ife 'system.copyright.notice' $item}action="" method="post"{/if} class="form-horizontal form-validate" enctype="multipart/form-data">
        <input type="hidden" name="id" value="{$item['id']}" />

        <div class="form-group">
            <label class="col-lg control-label">排序</label>
            <div class="col-sm-9 col-xs-12">
                {ife 'system.copyright.notice' $item}
                <input type="text" name="displayorder" class="form-control" value="{$item['displayorder']}" />
                <span class='help-block'>数字越大，排名越靠前</span>
                {else}
                <div class='form-control-static'>{$item['displayorder']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label must">公告标题</label>
            <div class="col-sm-9 col-xs-12 ">
                {ife 'system.copyright.notice' $item}
                <input type="text" id='title' name="title" class="form-control" value="{$item['title']}" data-rule-required="true" />
                {else}
                <div class='form-control-static'>{$item['title']}</div>
                {/if}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">发布者</label>
            <div class="col-sm-9 col-xs-12 ">
                {ife 'system.copyright.notice' $item}
                <input type="text" name="author" class="form-control" value="{$item['author']}"/>
                {else}
                <div class='form-control-static'>{$item['author']}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label">公告内容</label>
            <div class="col-sm-9">
                {php echo tpl_ueditor('content',$item['content'])}
            </div>
        </div>
        <div class="form-group">
            <label class="col-lg control-label">状态</label>
            <div class="col-sm-9 col-xs-12">
                {ife 'system.copyright.notice' $item}
                <label class='radio-inline'>
                    <input type='radio' name='status' value=1' {if $item['status']==1}checked{/if} /> 显示
                </label>
                <label class='radio-inline'>
                    <input type='radio' name='status' value=0' {if $item['status']==0}checked{/if} /> 隐藏
                </label>
                {else}
                <div class='form-control-static'>{if empty($item['status'])}隐藏{else}显示{/if}</div>
                {/if}
            </div>
        </div>

        <div class="form-group">
            <label class="col-lg control-label"></label>
            <div class="col-sm-9 col-xs-12">
                {ife 'system.copyright.notice' $item}
                <input type="submit" value="提交" class="btn btn-primary"  />

                {/if}
                <input type="button" name="back" onclick='history.back()' {ifp 'system.copyright.notice.add|system.copyright.notice.edit'}style='margin-left:10px;'{/if} value="返回列表" class="btn btn-default" />
            </div>
        </div>

        </form>

    </div>

<script language='javascript'>
    function formcheck() {
        if ($("#title").isEmpty()) {
            Tip.focus("title", "请填写公告名称!");
            return false;
        }
        return true;
    }
</script>

{template '_footer'}